package com.atguigu.b_threadstart1;
/*
     创建类[MyThread]继承Thread
 */
public class MyThread extends Thread{
    public MyThread() {
    }

    public MyThread(String name) {
        super(name);
    }

    //主动重写Thread类中的run方法 -> 编写线程对象的任务

    @Override
    public void run() {
        //假设 线程任务是 打印10次HelloWorld
        for (int i = 1; i <= 10; i++) {
            System.out.println(super.getName() + "HelloWorld" + i);
        }
    }
}
